Skip to content

Conversation

@LouisTsai-Csie
Copy link
Collaborator

@LouisTsai-Csie LouisTsai-Csie commented Nov 11, 2025

🗒️ Description

Add extra SSTORE benchmark cases, more details linked in the issue #1755 .

🔗 Related Issues or PRs

Issue #1755

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@LouisTsai-Csie LouisTsai-Csie self-assigned this Nov 11, 2025
@LouisTsai-Csie LouisTsai-Csie added A-test-benchmark Area: Tests Benchmarks—Performance measurement (eg. `tests/benchmark/*`, `p/t/s/e/benchmark/*`) P-high C-test Category: test labels Nov 11, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.06%. Comparing base (519eb26) to head (d6f8dc1).
⚠️ Report is 1 commits behind head on forks/osaka.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/osaka    #1774       +/-   ##
================================================
+ Coverage        53.45%   87.06%   +33.61%     
================================================
  Files              743      541      -202     
  Lines            44076    32832    -11244     
  Branches          3891     3015      -876     
================================================
+ Hits             23559    28586     +5027     
+ Misses           20306     3598    -16708     
- Partials           211      648      +437     
Flag Coverage Δ
unittests 87.06% <ø> (+33.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks some comments! :)

Comment on lines +442 to +452
@pytest.mark.parametrize("slot_count", [50, 100])
@pytest.mark.parametrize("use_access_list", [True, False])
@pytest.mark.parametrize(
"contract_size",
[
pytest.param(0, id="just_created"),
pytest.param(1024, id="small"),
pytest.param(12 * 1024, id="medium"),
pytest.param(24 * 1024, id="xen"),
],
)
@pytest.mark.parametrize("sloads_before_sstore", [True, False])
@pytest.mark.parametrize("num_contracts", [1, 5, 10])
@pytest.mark.parametrize(
"initial_value,write_value",
[
pytest.param(0, 0, id="zero_to_zero"),
pytest.param(0, 0xDEADBEEF, id="zero_to_nonzero"),
pytest.param(0xDEADBEEF, 0, id="nonzero_to_zero"),
pytest.param(0xDEADBEEF, 0xBEEFBEEF, id="nonzero_to_nonzero"),
],
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will create 384 seperate tests. Do we need this many here? Maybe we should remove some parameterization. I say this with the benchmark release process taking a long time in mind.

Maybe contract size and num contracts can have one element removed from each.

If these are required in your opinion please keep them. Just a thought.

@LouisTsai-Csie LouisTsai-Csie force-pushed the feat/extra-sstore-benchmark branch from 3c7d208 to 1072748 Compare November 26, 2025 06:31
@LouisTsai-Csie LouisTsai-Csie force-pushed the feat/extra-sstore-benchmark branch from 1072748 to 0f4e7eb Compare December 1, 2025 12:49
Comment on lines +436 to +439
pytest.param(0, id="just_created"),
pytest.param(1024, id="small"),
pytest.param(12 * 1024, id="medium"),
pytest.param(24 * 1024, id="xen"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this compatible with Kamil's tool you should set IDs that have the name of the test _ contract name.

See my file as an example to understand the naming convention: https://gist.github.com/CPerezz/51e292676f2420cfb601d251a7ad72e7

benchmark:
evm-type: benchmark
fill-params: --fork=Prague --gas-benchmark-values 1,10,30,45,60,100,150 -m "benchmark and not state_test" ./tests/benchmark
fill-params: --fork=Prague --gas-benchmark-values 5,10,30,45,60,100,150 -m "benchmark and not state_test" ./tests/benchmark
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think 1 is needed. But can be maybe done on the side?

I recall Maria wanted it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-benchmark Area: Tests Benchmarks—Performance measurement (eg. `tests/benchmark/*`, `p/t/s/e/benchmark/*`) C-test Category: test P-high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants